package net.qhzw.admin.controller;


import net.qhzw.admin.entity.PersonnelLearninginfo;
import net.qhzw.admin.param.PersonnelLearninginfoParam;
import net.qhzw.admin.query.PersonnelLearninginfoQuery;
import net.qhzw.admin.service.PersonnelLearninginfoService;
import net.qhzw.common.model.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


/***
 * 学习信息前端控制器
 */
@RestController
@RequestMapping("sys/personnelLearninginfo")
public class PersonnelLearninginfoController {

    @Autowired
    private PersonnelLearninginfoService personnelLearninginfoService;

    @GetMapping("/{id}")
    public JsonResult getPersonnelLearninginfo(@PathVariable(value = "id") String id) {
        return personnelLearninginfoService.getPersonnelLearninginfo(id);
    }


    @PostMapping("list")
    public JsonResult getPersonnelLearninginfoList(@RequestBody PersonnelLearninginfoQuery query) {
        return personnelLearninginfoService.getPersonnelLearninginfoList(query);
    }


    @DeleteMapping("/{id}")
    public JsonResult deletePersonnelLearninginfo(@PathVariable(value = "id") String id) {
        return personnelLearninginfoService.deletePersonnelLearninginfo(id);
    }


    @PostMapping
    public JsonResult addPersonnelLearninginfoList(@RequestBody PersonnelLearninginfoParam param) {
        return personnelLearninginfoService.update(param);
    }


    @PutMapping
    public JsonResult updatePersonnelLearninginfoList(@RequestBody PersonnelLearninginfoParam param) {
        return personnelLearninginfoService.update(param);
    }


}
